package com.atguigu.tingshu.common.config.threadpool;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.concurrent.TimeUnit;

/**
 * Description:
 *
 * @author Yanxinhao on 2025/1/24
 */
@ConfigurationProperties(prefix = "thread.pool")
@Data
public class ThreadPoolProperties {

    private Integer corePoolSize = Runtime.getRuntime().availableProcessors() * 2;

    private Integer maximumPoolSize = corePoolSize * 2;

    private Integer blockingQueueSize = 1000;

    private long keepAliveTime = 30;

    private TimeUnit timeUnit = TimeUnit.SECONDS;

}